<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:include="navigation::nav">
</div>
<h2>学生管理</h2><br>
<hr>
<div style="display: flex">
    <div>
        <table border="1px" style="width: 1200px">
            <tr>
                <th>学生</th>
                <th>学生名称</th>
                <th>学生账号</th>
                <th>班级编号</th>
                <th>班级名称</th>
                <th>学生头像</th>
                <th>操作</th>
                <th>操作</th>
            </tr>
            <tr th:each="x:${list}">
                <td th:text="${x.getUid()}"></td>
                <td th:text="${x.getUname()}"></td>
                <td th:text="${x.getPhone()}"></td>
                <td th:text="${x.getClz().getClzno()}"></td>
                <td th:text="${x.getClz().getClzname()}"></td>
                <td>
                    <div style="width: 10vw;height: 10vw">
                        <img style="width: 90%;height: 90%" th:src="'/home/shows/'+${x.getPic()}">
                    </div></td>
                <td><a th:href="'/stuadm/go2upte/'+${x.getUid()}">更改</a></td>
                <td><a th:href="'/stuadm/del/'+${x.getUid()}">删除</a></td>
            </tr>
        </table>
    </div>
    <div style="margin-left: 30px">
        <a href="/stuadm/show">添加一位新的学生</a>
        <hr>
        <p></p>
        <form method="post" th:action="'/stuadm/'+${action}"  enctype="multipart/form-data" th:each="j:${user}">
            <div th:if="${src!=null}">
                编号：<input name="uid" th:value="${j.uid}" type="text" readonly><br>
            </div>
            <br>
            名称：<input name="uname" th:value="${j.uname}" type="text"><br>
            <br>
            电话：<input name="phone" th:value="${j.phone}"  type="text"><br>
            <br>
            密码：<input name="pwd" th:value="${j.pwd}"  type="text"><br>
            <br>
            <div style="width: 6vw;height: 6vw" th:if="${src!=null}">
                <img style="width: 90%;height: 90%" th:src="'/home/shows/'+${j.pic}">
            </div>
            上传图片：<input name="img"  type="file"><br>
            <br>
            课程:<select name="clz.clzno">
            <option th:each="i:${clz}"
                    th:text="${i.getClzname()}"
                    th:value="${i.getClzno()}">
            </option>
        </select><br>
            <input type="submit"value="确认">
        </form>
    </div>
</div>
<h2 th:if="${addUp!=null}" th:text="${addUp}"></h2>
</body>
</html>